#ifndef EVENTLOOP_H
#define EVENTLOOP_H

#include <atomic>
#include <vector>
class Channel;
class Poller;

class EventLoop{
public:
    EventLoop();
    ~EventLoop();

    void loop();
    void quit();

    virtual void updateChannel(Channel* channel);
    virtual void removeChannel(Channel* channel);

private:
    std::atomic<bool> looping_;
    std::atomic<bool> quit_;

    Poller* poller_;
    std::vector<Channel*> activeChannels_;
};

#endif